<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label for="title" class="control-label col-xs-12 col-sm-2">{:__('title')}:</label>
        <div class="col-xs-12 col-sm-9">
            <input type="text" class="form-control" id="title" name="row[title]" value="{$row['title']}" data-rule="required;title" />
        </div>
    </div>
    <div class="form-group">
        <label for="title" class="control-label col-xs-12 col-sm-2">{:__('title_en')}:</label>
        <div class="col-xs-12 col-sm-9">
            <input type="text" class="form-control" id="title_en" name="row[title_en]" value="{$row['title_en']}" data-rule="required;title" />
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Announcement type')}:</label>
        <div class="col-xs-12 col-sm-9">
            {:build_select('row[type]', $category, $row['type'], ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
        </div>
    </div>

    <div class="form-group">
        <label for="contents" class="control-label col-xs-12 col-sm-2">{:__('contents')}:</label>
        <div class="col-xs-12 col-sm-9">
            <textarea class="form-control editor" rows="15" id="contents" name="row[contents]" data-rule="required;contents" >{$row['contents']}</textarea>
        </div>
    </div>


    <div class="form-group">
        <label for="contents" class="control-label col-xs-12 col-sm-2">{:__('contents_en')}:</label>
        <div class="col-xs-12 col-sm-9">
            <textarea class="form-control editor" rows="15" id="contents_en" name="row[contents_en]" data-rule="required;contents" >{$row['contents_en']}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label for="c-avatar" class="control-label col-xs-12 col-sm-2">{:__('upimgs')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-avatar" data-rule="" class="form-control" size="50" name="row[images]" type="text" value="{$row['images']}">
                <div class="input-group-addon no-border no-padding">
                    <span>
                        <button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button>
                    </span>
                    <span>
                        <button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Select')}</button>
                    </span>
                </div>
                <span class="msg-box n-right" for="c-avatar"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-avatar"></ul>
        </div>
    </div>

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('status')}:</label>-->
<!--        <div class="col-xs-12 col-sm-7">-->
<!--            {:build_radios('row[status]', ['0'=>__('untreated'), '1'=>__('processed')])}-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-7">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>